﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace InformationExtraction.Common
{
    class Sentence : TokenSequence
    {
        /// <summary>
        /// 是否为所在段落中的第一句
        /// </summary>
        public bool IsFirstSentenceInParagraph
        {
            get
            {
                return IsParagraphHeader;
            }
        }

        /// <summary>
        /// 是否为所在段落中的最后一句
        /// </summary>
        public bool IsLastSentenceInParagraph
        {
            get
            {
                return IsParagraphEnd;
            }
        }

        /// <summary>
        /// 下一个句子
        /// </summary>
        public Sentence NextSentence
        {
            get
            {
                return (Sentence)Next;
            }
        }

        public override object Clone()
        {
            Sentence sentence = new Sentence();

            sentence.RawContent = RawContent;
            sentence.Content = Content;
            sentence.IsParagraphEnd = IsParagraphEnd;
            sentence.IsParagraphHeader = IsParagraphHeader;
            sentence.Next = Next;
            sentence.Tokens = Tokens;

            sentence.No = No;
            return sentence;
        }
    }
}
